home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / TPRINT.DMO < prev    next >
Text File  |  1996-07-04  |  4KB  |  62 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   TPRINT  .DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. $INCLUDE "DAS-NBT1.INC"        ' use "DAS-NBT0.INC" for mouse support
  19. WIDTH 80,25                    ' CHANGE 25 TO 43 or 50
  20. SCREEN 0,,1,1                  ' Apage = 1 and Vpage = 1
  21. COLOR 7, 0
  22. CLS
  23. ? "┌───────────────────────────────────────────────────────────────────────
  24. ? "│  Tprint   ( Row?, Col?, V$, Attr? )
  25. ? "│ fTprint?? ( Row?, Col?, V$, Attr? )
  26. ? "├─────────────────────────────────────────────────────────────────────────
  27. ? "│ Before going into all the cousins to this routine it is important to know
  28. ? "│ what is going on here as they all work the same with some added feature.
  29. ? "│ 1. the cursor is NOT effected []
  30. ? "│ 2. the COLOR command has no effect and is not effected
  31. ? "│ 3. the screen will NOT scroll
  32. ? "│ 4. you cannot (are not allowed to) print past the end of the screen
  33. ? "│ 5. you can change the color attribute in the middle of the string
  34. ? "│ 6. printing can be done using the current attribute(s) found on the screen
  35. ? "├─────────────────────────────────────────────────────────────────────────────
  36. ? "│ The 'trigger' to change attributes is CHR$(17) or ^PQ then CHR$(Attr?)
  37. ? "│ The test below changes from Attr? = 30 to Attr? = 31
  38. ? "└─────────────────────────────────────────────────────────────────────────────
  39.  
  40. LOCATE 7,34,1,15,16
  41. Text$ = " This is a test. "   : Tprint 17, 1, Text$, 30    ' yellow on blue
  42.                                 Tprint 18, 1, Text$,  0    ' screen's attr
  43. Text$ = " This is a test. " : Tprint 19, 1, Text$, 30    ' change attrs
  44.  
  45. Tprint 21, 1, STRING$(2000,65), 112                        ' past the end
  46.  
  47. MAP A$$ * 13, 6 AS A1$$, 2 AS A2$$, 5 AS A3$$
  48. A1$$ = "HELLO"
  49. A2$$ = CHR$(17,31)
  50. A3$$ = "WORLD"
  51. Tprint 22, 13, A$$, 30
  52.  
  53. TYPE JunkTYPE                             ' Tprint can be used to print
  54.   A AS STRING * 6                         ' literal strings, functions,
  55.   T AS STRING * 2                         ' types and just about anything
  56.   B AS STRING * 5                         ' that is translated into a string
  57. END TYPE                                  ' by PowerBASIC. This phenomenon
  58. DIM tT AS JunkTYPE                        ' is NOT shared by most of it's
  59. tT.A = "HELLO "                           ' cousins as it is both space and
  60. tT.T = CHR$(17,31)                        ' time consuming. Further it is,
  61. tT.B = "WORLD"                            ' for the best part, unnecessary
  62. Tprint 23, 13, tT, 30                     ' for the other routines